package com.zzyl.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.zzyl.dto.NursingProjectPlanDto;
import com.zzyl.entity.NursingProject;
import com.zzyl.entity.NursingProjectPlan;
import com.zzyl.mapper.NursingProjectPlanMapper;
import com.zzyl.service.NursingProjectPlanService;
import com.zzyl.vo.NursingProjectPlanVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class NursingProjectPlanImpl implements NursingProjectPlanService {

    @Autowired
    private NursingProjectPlanMapper nursingProjectPlanMapper;

    @Override
    public void addProjectPlans(List<NursingProjectPlanDto> plans) {
        nursingProjectPlanMapper.addProjectPlans(plans);
    }

    //修改项目计划
    @Override
    public void updateProjectPlans(NursingProjectPlanVo projectPlan) {
        nursingProjectPlanMapper.updateProjectPlans(projectPlan);
    }

    //查询项目计划
    @Override
    public List<NursingProjectPlanVo> getProjectPlans(Long id) {
        return nursingProjectPlanMapper.getProjectPlans(id);
    }

    //删除项目计划
    @Override
    public void deleteProjectPlans(long id) {
        nursingProjectPlanMapper.deleteProjectPlans(id);
    }
}


















